/////////////////////////////////////////////////////////////////////////////
// Name:        sql-ledgerpointofsale.h
// Purpose:     
// Author:      Herry Sugiharto
// Modified by: 
// Created:     07/09/2008 00:46:26
// RCS-ID:      
// Copyright:   Copyright (c) 2000, 2008 Krida Software Division
// Licence:     
/////////////////////////////////////////////////////////////////////////////

#ifndef _SLPOINTOFSALE_H_
#define _SLPOINTOFSALE_H_


/*!
 * Includes
 */

////@begin includes
#include "wx/valtext.h"
#include "wx/valgen.h"
#include "wx/statusbr.h"
////@end includes
#include "slposapp.h"
#include "data.h"

/*!
 * Forward declarations
 */

////@begin forward declarations
////@end forward declarations

/*!
 * Control identifiers
 */

////@begin control identifiers
#define ID_SLPOINTOFSALE 10000
#define ID_GRANDTOTAL 10001
#define ID_TEXT_SCAN 10003
#define ID_STATIC_DISCOUNT 10005
#define ID_STATIC_PERCENT 10004
#define ID_STATIC_X 10006
#define ID_STATIC_QTY 10007
#define ID_STATUSBAR 10008
#define SYMBOL_SLPOINTOFSALE_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxTAB_TRAVERSAL
#define SYMBOL_SLPOINTOFSALE_TITLE _("SQL-Ledger Point of Sale")
#define SYMBOL_SLPOINTOFSALE_IDNAME ID_SLPOINTOFSALE
#define SYMBOL_SLPOINTOFSALE_SIZE wxDefaultSize
#define SYMBOL_SLPOINTOFSALE_POSITION wxDefaultPosition
////@end control identifiers


/*!
 * SLPointofSale class declaration
 */

class SLPointofSale: public wxDialog
{    
    DECLARE_DYNAMIC_CLASS( SLPointofSale )
    DECLARE_EVENT_TABLE()

public:
    /// Constructors
    SLPointofSale();
    SLPointofSale( wxWindow* parent, wxWindowID id = SYMBOL_SLPOINTOFSALE_IDNAME, const wxString& caption = SYMBOL_SLPOINTOFSALE_TITLE, const wxPoint& pos = SYMBOL_SLPOINTOFSALE_POSITION, const wxSize& size = SYMBOL_SLPOINTOFSALE_SIZE, long style = SYMBOL_SLPOINTOFSALE_STYLE );

    /// Creation
    bool Create( wxWindow* parent, wxWindowID id = SYMBOL_SLPOINTOFSALE_IDNAME, const wxString& caption = SYMBOL_SLPOINTOFSALE_TITLE, const wxPoint& pos = SYMBOL_SLPOINTOFSALE_POSITION, const wxSize& size = SYMBOL_SLPOINTOFSALE_SIZE, long style = SYMBOL_SLPOINTOFSALE_STYLE );

    /// Destructor
    ~SLPointofSale();

    /// Initialises member variables
    void Init();

    /// Creates the controls and sizers
    void CreateControls();

////@begin SLPointofSale event handler declarations

    /// wxEVT_COMMAND_TEXT_ENTER event handler for ID_TEXT_SCAN
    void OnTextScanEnter( wxCommandEvent& event );

    /// wxEVT_KEY_DOWN event handler for ID_TEXT_SCAN
    void OnKeyDown( wxKeyEvent& event );

////@end SLPointofSale event handler declarations

////@begin SLPointofSale member function declarations

    wxString GetScannedText() const { return ScannedText ; }
    void SetScannedText(wxString value) { ScannedText = value ; }

    /// Retrieves bitmap resources
    wxBitmap GetBitmapResource( const wxString& name );

    /// Retrieves icon resources
    wxIcon GetIconResource( const wxString& name );
////@end SLPointofSale member function declarations

    /// Should we show tooltips?
    static bool ShowToolTips();

////@begin SLPointofSale member variables
private:
    wxString ScannedText;
    CashierData* cashierdata;
    wxString quantity;
    long grandtotal;
    wxString discount;
////@end SLPointofSale member variables
    void ResetView();
};

#endif
    // _SQL-LEDGERPOINTOFSALE_H_
